﻿namespace PSAMMatrixCloud.BLL.BizCommon
{
    public class SimpleResultHelper : Common.SimpleResultHelper
    { /// <summary>
      /// 设置返回的结果集
      /// </summary>
      /// <param name="errorCode"></param>
      /// <param name="data"></param>
      /// <param name="isSuccess"></param>
      /// <returns></returns>
        public static Common.SimpleResult SetDataExt(string errorCode, object data = null, bool isSuccess = false)
        {
            Common.SimpleResult ret = new Common.SimpleResult();
            string message = Common.commonFunction.GetCustomAttrMsg<ErrorMsg>(ErrorMsg.GetInstance(), errorCode);
            ret.Status = (isSuccess ? "1" : "0");
            ret.Message = message;
            ret.ErrorCode = errorCode;
            ret.Data = data;
            return ret;
        }
    }
}